$converged = ProcessWork$($A[M][N]$ : matrix, $[lb_i, ub_i]$ : row block $i$, $[lb_j, ub_j]$ : row block $j$, $\delta$) 
\begin{algorithmic}
\STATE $converged \gets true$
\FOR{$i=lb_i$ to $ub_i$}
  \STATE $S[i] \gets A[i]^T A[i]$
\ENDFOR
\FOR{$j=lb_j$ to $ub_j$}
  \STATE $S[j] \gets A[j]^T A[j]$
\ENDFOR
\FOR{$i=lb_i$ to $ub_i$}
  \FOR{$j=lb_j$ to $ub_j$}
    \IF{$i < j$}
      \STATE $g \gets A[i]^T A[j]$
      \IF{$|g|> \delta$}
        \STATE $converged \gets false$
      \ENDIF
      \IF{$|g| > \epsilon$}
        \STATE $c, s \gets jacobi(S[i], S[j], g)$
        \STATE $A[i], A[j] \gets cA[i] - sA[j], sA[i] + cA[j]$
      \ENDIF
    \ENDIF
  \ENDFOR
\ENDFOR
\STATE return $converged$
\end{algorithmic}
